﻿using EMS.system.Entityies.MasterData.UnitMeasureModel;
using EMS.system.IEntityAppService.MasterData.UnitMeasureService.UnitMeasureDTOs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace EMS.system.IEntityAppService.MasterData.UnitMeasureService
{
    public interface IUnitMeasureAppService : IApplicationService
    {
        /// <summary>
        /// 获取计量单位列表 分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="unitMeasureCode"></param>
        /// <param name="unitMeasureName"></param>
        /// <returns></returns>
        Task<PagedResult> GetUnitMeasureList(int pageIndex, int pageSize, string? unitMeasureCode, string? unitMeasureName);
        /// <summary>
        /// 添加计量单位
        /// </summary>
        /// <param name="unitMeasureDTO"></param>
        /// <returns></returns>
        Task<int> CreateUnitMeasure(UnitMeasureDTO unitMeasureDTO);

        /// <summary>
        /// 删除计量单位
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DeleteUnitMeasure(string ids);
        /// <summary>
        /// 获取计量单位主键Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UnitMeasureDTO> GetUnitMeasureById(int id);
        /// <summary>
        /// 更新计量单位
        /// </summary>
        /// <param name="unitMeasureDTO"></param>
        /// <returns></returns>
        Task<int> UpdateUnitMeasure(UnitMeasureDTO unitMeasureDTO);
        /// <summary>
        /// 获取计量单位列表
        /// </summary>
        /// <param name="isPrimaryUnit"></param>
        /// <returns></returns>
        Task<List<UnitMeasureDTO>> GetUnitMeasure(bool isPrimaryUnit = true);
        ///// <summary>
        ///// Redis集群
        ///// </summary>
        ///// <param name="isPrimaryUnit"></param>
        ///// <returns></returns>
        //Task<List<UnitMeasureDTO>> GetUnitMeasureRedis(bool isPrimaryUnit = true);
    }
}
